public class Array_05 {
    public static void main(String[] args) {
        int[] arr = {6, 23, 4};
        int[] arr2 = {2312, 445, 54534};
        boolean result=compare(arr, arr2);
        System.out.println(result);
    }

    //需求 设计一个方法，用于比较两个数组的内容是否相同
    public static boolean compare(int[] arr, int[] arr2) {
        if (arr.length != arr2.length) {
            return false;
        } else {
            for (int i = 0; i < arr.length; i++) {
                if (arr[i] != arr2[i])
                    return false;
            }
        }
        return true;
    }
}